﻿using System;

using SBPweb.Forge.Modules.Modularity;

namespace SBPweb.Forge.Modules.Smartparts
{
    /// <summary>
    /// This interface represents a smartpart.
    /// A smartpart is a generalisation of a control, extended with specific properties.
    /// </summary>
	public interface ISmartpart
    {
        /// <summary>
        /// Gets or sets the value indicatig whether the ISmartpart is displayed.
        /// </summary>
        bool IsVisible
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the value indicatig whether the ISmartpart can respond to user interaction.
        /// </summary>
        bool IsEnabled
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the value indicating whether the ISmartpart is displayed as a dialog form.
        /// </summary>
        bool IsModal
        {
            get;
        }

        /// <summary>
        /// Gets the parent modul of the ISmartpart.
        /// </summary>
        IModule ParentModule
        {
            get;
        }

        /// <summary>
        /// Occurs, when the IsVisible property changes.
        /// </summary>
        event EventHandler VisibleChanged;

        /// <summary>
        /// Occurs, when the IsEnabled property changes.
        /// </summary>
        event EventHandler EnabledChanged;

    }
}
